package org.feng.lifecycle;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.event.Observes;

import io.quarkus.runtime.ShutdownEvent;
import io.quarkus.runtime.StartupEvent;
import org.jboss.logging.Logger;
/**
 * 监控系统启动和停止
 * @author zjxbj
 *
 */
@ApplicationScoped
public class AppStartStopBean {

    private static final Logger LOGGER = Logger.getLogger(AppStartStopBean.class);
    /**
     * 启动
     * @param ev
     */
    void onStart(@Observes StartupEvent ev) { 
    	
         LOGGER.info("冯文学 The application is starting...");
    }

    /**
     * 停止
     * @param ev
     */
    void onStop(@Observes ShutdownEvent ev) {               
        LOGGER.info("冯文学 The application is stopping...");
    }

}

